package com.zhao.common.support;

/**
 * 异常
 * 
 * @author zhaoyongfei
 *
 */
public class BootException extends Exception {
	private static final long serialVersionUID = 1L;
	private StatusCodeEnum statusCodeEnum;

	public static BootException createException() {
		return new BootException();
	}

	public BootException() {
		super();
		this.statusCodeEnum = StatusCodeEnum.SYSTEM_EXCEPTION;
	}

	public BootException(StatusCodeEnum statusCodeEnum) {
		super();
		this.statusCodeEnum = statusCodeEnum;
	}

	public BootException(Throwable t, StatusCodeEnum statusCodeEnum) {
		super(t);
		this.statusCodeEnum = statusCodeEnum;
	}

	public String toString() {
		return super.toString() + "<" + statusCodeEnum.getStatusCode() + ">";
	}

}